import Mock from 'mockjs'
//import '@/mock/extend'
//import {parseUrlParams} from '@/utils/request'
const Random = Mock.Random;
const deviceTypes = ['篦冷机', '厂内', '锟压机', '回转窑', '煤磨', '水泥磨', '原料磨', '样机'];

const source3 = Mock.mock({
  'list|30': [{
    'id|+1': 0,
    'deviceName': () => `云盒-${Random.string('number', 6)}`,
    'organizationName': () => `${Random.province()}-石化厂`,
    'deviceType': () => `YH-${Random.string('number', 6)}`,
    'deviceModel|100-150': 100,
    'status|1': ['在线', '离线']
  }]
})
const source={

    particleSizeDistribution:{
      title: "颗粒度分布",
      child: [
        { title: "A：70-90μm", flag: false, value: 2001001 },
        { title: "B：90-110μm", flag: false, value: 2001002 },
        { title: "C：110-140μm", flag: false, value: 2001003 },
        { title: "D：140-170μm", flag: false, value: 2001004 },
        { title: "E：170-200μm", flag: false, value: 2001005 },
        { title: "F：200-230μm", flag: false, value: 2001006 },
        { title: "G：230-280μm", flag: false, value: 2001007 },
        { title: "H：280-350μm", flag: false, value: 2001008 },
        { title: "I：350-420μm ", flag: false, value: 2001009 },
        { title: "J：>420μm ", flag: false, value: 2001010 }
      ]
    }
  }
  const source2=[
    { id:1,name:'粘度',list:[{date:'2024/03/21',value:2},
        {date:'2024/03/22',value:3},
        {date:'2024/03/23',value:4},
        {date:'2024/03/24',value:5},
        {date:'2024/03/25',value:6},
        {date:'2024/03/26',value:7},
        {date:'2024/03/27',value:8}]},
    { id:2,name:'密度', list:[{date:'2024/03/21',value:2},
        {date:'2024/03/22',value:3},
        {date:'2024/03/23',value:4},
        {date:'2024/03/24',value:5},
        {date:'2024/03/25',value:6},
        {date:'2024/03/26',value:7},
        {date:'2024/03/27',value:8}]},
    { id:3,name:'介电常数', list:[{date:'2024/03/21',value:2},
        {date:'2024/03/22',value:3},
        {date:'2024/03/23',value:4},
        {date:'2024/03/24',value:5},
        {date:'2024/03/25',value:6},
        {date:'2024/03/26',value:7},
        {date:'2024/03/27',value:8}]},
    { id:4,name:'水活性', list:[{date:'2024/03/21',value:2},
        {date:'2024/03/22',value:3},
        {date:'2024/03/23',value:4},
        {date:'2024/03/24',value:5},
        {date:'2024/03/25',value:6},
        {date:'2024/03/26',value:7},
        {date:'2024/03/27',value:8}]},
    { id:5,name:'含水量', list:[{date:'2024/03/21',value:2},
        {date:'2024/03/22',value:3},
        {date:'2024/03/23',value:4},
        {date:'2024/03/24',value:5},
        {date:'2024/03/25',value:6},
        {date:'2024/03/26',value:7},
        {date:'2024/03/27',value:8}]},
  ]
  export default [
    {
      url:'/api/device/getdata',
      method:'get',
      response:() => {
        return {
          code: 200,
          data: source2
        }
      }
    },
    {
      url:'/api/device/getdevicelist',
      method:'get',
      response:() => {
        return {
          code: 200,
          data: source3
        }
      }
    }
  ]